package com.springboot.demo.design.pattern.listen;

import com.springboot.demo.design.pattern.Order;
import org.springframework.stereotype.Component;

/**
 * 更新账户监听器
 *
 * @author supu
 * @date 2019-07-02 14:30
 **/
@Component
public class UpdateAccountListener<T extends ListenerContext> implements Listener<T> {
    @Override
    public void listen(T context) {
        Order order = (Order) context.getData();
        System.out.println("update account is process, account=" + order.getAccountId());
    }
}
